#include "StdAfx.h"
#include <MyControls/TextControl.h>

TextControl::TextControl()
{
	m_State = Modifiable;
}

TextControl::~TextControl()
{
}

void TextControl::SetState(State s)
{
	if (s != m_State) {
		m_State = s;
		switch (m_State) {
		case Modifiable:
			SetVisible(true);
			SetEnabled(true);
			break;
		case ReadOnly:
			SetVisible(true);
			SetEnabled(false);
			break;
		case Hidden:
			SetVisible(false);
			SetEnabled(false);
			break;
		}
	}
}
